package pl.edu.project.NewCalendar;

import javax.swing.JFrame;

import org.jdesktop.application.Application;
import org.jdesktop.application.ApplicationContext;
import org.jdesktop.application.ResourceManager;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;

import pl.edu.project.controller.CalendarController;
import pl.edu.project.controller.CalendarEventsController;
import pl.edu.project.controller.MainViewController;
import pl.edu.project.model.EventsList;
import pl.edu.project.view.CalendarEventsFrame;
import pl.edu.project.view.CalendarFrame;
import pl.edu.project.view.MainViewFrame;

public class StartApp extends SingleFrameApplication {

    /**
     * @param args
     * @throws InterruptedException
     */
    public static void main(String[] args) throws InterruptedException {
	Application.launch(StartApp.class, args);
    }

    ApplicationContext ctxt;
    ResourceMap resource;

    @Override
    protected void initialize(String[] args) {
	System.out.println("Inicjalizacja... ");
	this.ctxt = getContext();
	ResourceManager mgr = ctxt.getResourceManager();
	resource = mgr.getResourceMap(StartApp.class);
    }

    @Override
    protected void startup() {


	MainViewFrame view= new MainViewFrame();
	MainViewController mainViewController = MainViewController.getInstance();
	mainViewController.initMainViewFrame(view);
	show(view);
    }

}
